num = int(input())
for a in range(num):
k = input()
e = k.count("E")
num = k.count("N")
if num==1:
print("NO")
else:
print("YES")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=2e5+10;
int s[N];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int T;
cin>>T;
while(T--) {
string s;
cin>>s;
cout<<(count(s.begin(),s.end(),'N')==1?"NO":"YES")<<'\n';
}
return 0;
}
42. Trapping Rain Water | 32. Longest Valid Parentheses |
Cutting a material | Bubble Sort |
Number of triangles | AND path in a binary tree |
Factorial equations | Removal of vertices |
Happy segments | Cyclic shifts |
Zoos | Build a graph |
Almost correct bracket sequence | Count of integers |
Differences of the permutations | Doctor's Secret |
Back to School | I am Easy |
Teddy and Tweety | Partitioning binary strings |
Special sets | Smallest chosen word |
Going to office | Color the boxes |
Missing numbers | Maximum sum |
13 Reasons Why | Friend's Relationship |
Health of a person | Divisibility |